package com.city.domain.city;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 民情日记被访人员记录
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "city_copnote_person", schema = "city", catalog = "")
public class CityCopnotePerson {
    private int id;//主键
    private Integer copnoteId;//民情日记的id
    private String name;//被访人的姓名
    private int familyPnum;//家庭成员数量
    private String houseStatus;//住房条件
    private Integer economicsIncome;//资金收入情况
    private Integer personType;//被访人员类别
    private String content;//访问内容
    private String experience;//被访问候的心得
    private String time;//被访时间
    private String updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public Integer getCopnoteId() {
        return copnoteId;
    }

    public void setCopnoteId(Integer copnoteId) {
        this.copnoteId = copnoteId;
    }


    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "family_pnum")
    public int getFamilyPnum() {
        return familyPnum;
    }

    public void setFamilyPnum(int familyPnum) {
        this.familyPnum = familyPnum;
    }

    @Basic
    @Column(name = "house_status")
    public String getHouseStatus() {
        return houseStatus;
    }

    public void setHouseStatus(String houseStatus) {
        this.houseStatus = houseStatus;
    }

    public Integer getEconomicsIncome() {
        return economicsIncome;
    }

    public void setEconomicsIncome(Integer economicsIncome) {
        this.economicsIncome = economicsIncome;
    }

    @Basic
    @Column(name = "person_type")
    public Integer getPersonType() {
        return personType;
    }

    public void setPersonType(Integer personType) {
        this.personType = personType;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "experience")
    public String getExperience() {
        return experience;
    }

    public void setExperience(String experience) {
        this.experience = experience;
    }

    @Basic
    @Column(name = "time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CityCopnotePerson that = (CityCopnotePerson) o;
        return id == that.id &&
                copnoteId == that.copnoteId &&
                familyPnum == that.familyPnum &&
                Objects.equals(name, that.name) &&
                Objects.equals(houseStatus, that.houseStatus) &&
                Objects.equals(economicsIncome, that.economicsIncome) &&
                Objects.equals(personType, that.personType) &&
                Objects.equals(content, that.content) &&
                Objects.equals(experience, that.experience) &&
                Objects.equals(time, that.time) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, copnoteId, name, familyPnum, houseStatus, economicsIncome, personType, content, experience, time, updateTime);
    }

    @Override
    public String toString() {
        return "CityCopnotePerson{" +
                "id=" + id +
                ", copnoteId='" + copnoteId + '\'' +
                ", name='" + name + '\'' +
                ", familyPnum=" + familyPnum +
                ", houseStatus='" + houseStatus + '\'' +
                ", economicsIncome=" + economicsIncome +
                ", personType=" + personType +
                ", content='" + content + '\'' +
                ", experience='" + experience + '\'' +
                ", time='" + time + '\'' +
                ", updateTime='" + updateTime + '\'' +
                '}';
    }
}
